package be.nepherte.movmanager.client.ui.components;

import com.google.gwt.event.dom.client.HasClickHandlers;

/**
 * Implementors of this interface are navigatable and can browse to the
 * left and right. 
 * 
 * <p>
 * Copyright © 2010 Bart Verhoeven
 * </p>
 * 
 * <p>
 * This file is part of MovManger.
 * </p>
 * 
 * <p>
 * MovManger is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 * </p>
 * 
 * <p>
 * MovManger is distributed in the hope that it will be useful, but WITHOUT ANY
 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 * </p>
 * 
 * <p>
 * You should have received a copy of the GNU General Public License along with
 * MovManger. If not, see http://www.gnu.org/licenses/.
 * </p>
 * 
 * @author	Bart Verhoeven
 * @version	0.1
 */
public interface Navigatable {

	/**
	 * Shows the previous {@link #getMaxVisibleElements()} elements. When there
	 * are j < {@link #getMaxVisibleElements()} elements remaining to the left,
	 * only j elements will be shown.
	 */
	public void navigateLeft();
	
	/**
	 * Shows the next {@link #getMaxVisibleElements()} elements. When there are
	 * j < {@link #getMaxVisibleElements()} elements remaining to the right,
	 * only j elements will be shown.
	 */
	public void navigateRight();
	
	/**
	 * Retrieves the element that allows to navigate to the left.
	 */
	public HasClickHandlers getLeftNavigationElement();
	
	/**
	 * Retrieves the element that allows to navigate to the right.
	 */
	public HasClickHandlers getRightNavigationElement();
	
	/**
	 * Sets the maximum number of visible elements and renders accordingly.
	 * 
	 * @param	i
	 *          the maximum number of visible elements
	 */
	public void setMaxVisibleElements(int i);
	
	/**
	 * Retrieves the maximum number of visible elements.
	 */
	public int getMaxVisibleElements();
}
